package com.dragon.mmochat.model.role;

import java.util.ArrayList;
import java.util.List;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.award.MmochatBigMoneyAward;
import com.dragon.mmochat.model.award.MmochatEquipAward;
import com.dragon.mmochat.model.award.MmochatPropAward;
import com.dragon.mmochat.model.battle.MmochatBattle;
import com.dragon.mmochat.model.enumType.MmochatNpcFaceType;
import com.dragon.mmochat.model.enumType.MmochatTaskType;
import com.dragon.mmochat.model.task.MmochatNpcBattle;
import com.dragon.mmochat.util.MmochatUtil;
import com.google.gson.reflect.TypeToken;

//活动NPC，根据玩家队伍中最高等级决定NPC的战斗力
public class MmochatActivityNpc extends MmochatTempNpc {
	private static final long serialVersionUID = 3997432499751643308L;
	private String appearTime; // 可能出现的时间
	private List<Integer> appearMap = new ArrayList<Integer>();// 可能出现的地图
	private boolean isAppearInAllMap = true; // 是否出现在所有可能的地图
	private MmochatTaskType battleType = null;
	private int minTeamNum = 1; // 最少组队人数
	private Integer minLevel = null; // 最低等级要求,null为无限制
	private Integer maxLevel = null; // 最高等级限制,null为无限制
	private int appearNum = 1; // 每个地图出现的数量
	private MmochatNpcBattle battle = new MmochatNpcBattle();
	private boolean willKillPlayer = true; // 玩家战斗失败，是否死亡
	private String systemMsg = null; // 系统消息
	// 奖励
	private int money = 0;
	private int exp = 0; // 野外怪物奖励的经验倍数
	private int dao = 0;
	private int zhangJi = 0; // 战绩
	private List<MmochatEquipAward> finish_award_equips = new ArrayList<MmochatEquipAward>();// 装备奖励
	private List<MmochatPropAward> finish_award_props = new ArrayList<MmochatPropAward>();
	private MmochatBigMoneyAward finish_award_bigMoney = new MmochatBigMoneyAward();

	public MmochatActivityNpc() {
		if (MmochatUtil.isInPercent(50)) {
			face = MmochatNpcFaceType.朝左;
		} else {
			face = MmochatNpcFaceType.朝右;
		}
	}

	public MmochatActivityNpc getClone() {
		return (MmochatActivityNpc) MmochatUtil.deepClone(this);
	}

	public String getAppearTime() {
		return appearTime;
	}

	public void setAppearTime(String appearTime) {
		this.appearTime = appearTime;
	}

	public List<Integer> getAppearMap() {
		return appearMap;
	}

	public void setAppearMap(List<Integer> appearMap) {
		this.appearMap = appearMap;
	}

	public void addAppearMap(int map) {
		if (!appearMap.contains(map)) {
			appearMap.add(map);
		}
	}

	public MmochatTaskType getBattleType() {
		return battleType;
	}

	public void setBattleType(MmochatTaskType battleType) {
		this.battleType = battleType;
	}

	public int getMinTeamNum() {
		return minTeamNum;
	}

	public void setMinTeamNum(int minTeamNum) {
		this.minTeamNum = minTeamNum;
	}

	public int getAppearNum() {
		return appearNum;
	}

	public void setAppearNum(int appearNum) {
		this.appearNum = appearNum;
	}

	public MmochatNpcBattle getBattle() {
		return battle;
	}

	public void setBattle(MmochatNpcBattle battle) {
		this.battle = battle;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public int getExp() {
		return exp;
	}

	public void setExp(int exp) {
		this.exp = exp;
	}

	public int getDao() {
		return dao;
	}

	public void setDao(int dao) {
		this.dao = dao;
	}

	public boolean isWillKillPlayer() {
		return willKillPlayer;
	}

	public void setWillKillPlayer(boolean willKillPlayer) {
		this.willKillPlayer = willKillPlayer;
	}

	public List<MmochatEquipAward> getFinish_award_equips() {
		return finish_award_equips;
	}

	public void setFinish_award_equips(List<MmochatEquipAward> finishAwardEquips) {
		finish_award_equips = finishAwardEquips;
	}

	public List<MmochatPropAward> getFinish_award_props() {
		return finish_award_props;
	}

	public void setFinish_award_props(List<MmochatPropAward> finishAwardProps) {
		finish_award_props = finishAwardProps;
	}

	public MmochatBigMoneyAward getFinish_award_bigMoney() {
		return finish_award_bigMoney;
	}

	public void setFinish_award_bigMoney(
			MmochatBigMoneyAward finishAwardBigMoney) {
		finish_award_bigMoney = finishAwardBigMoney;
	}

	public int getZhangJi() {
		return zhangJi;
	}

	public void setZhangJi(int zhangJi) {
		this.zhangJi = zhangJi;
	}

	public String getSystemMsg() {
		return systemMsg;
	}

	public void setSystemMsg(String systemMsg) {
		this.systemMsg = systemMsg;
	}

	public boolean isAppearInAllMap() {
		return isAppearInAllMap;
	}

	public void setAppearInAllMap(boolean isAppearInAllMap) {
		this.isAppearInAllMap = isAppearInAllMap;
	}

	public Integer getMinLevel() {
		return minLevel;
	}

	public void setMinLevel(Integer minLevel) {
		this.minLevel = minLevel;
	}

	public Integer getMaxLevel() {
		return maxLevel;
	}

	public void setMaxLevel(Integer maxLevel) {
		this.maxLevel = maxLevel;
	}

}
